#include<stdio.h>
#include<unistd.h>

int main() 
{
	printf("Forking......\n");
	pid_t fpid = fork();

	if (fpid < 0)
		printf("Error in fork!\n");
	else if (fpid == 0)
		printf("This is child process, pid = %d.\n", getpid());
	else
		printf("This is parent process, pid = %d.\n", getpid());

	return 0;
}